use  "${Input}\mhd1_dta\mhdlh1.dta" 
sort case 
save ${Output}\Roster, replace


use case person lh12y lh20 lh21 lh26 using ${Output}\Roster
rename person lh16
rename lh12y Splh12y
rename lh26 Splh26
rename lh20 Splh20
rename lh21 Splh21
sort case lh16
save ${Output}\junk, replace

use ${Output}\MainFile
sort case lh16
merge case lh16 using ${Output}\junk, nokeep
drop _merge
save ${Output}\MainFile, replace

use case person  ed01 ed02* ed03   ed07 ed08a using "${Input}\mhd3_dta\mhded1.dta" 
for var ed01 ed02* ed03   ed07 ed08a: rename X SpX
generate lh16=person
drop person
sort case lh16
save ${Output}\Education, replace

use ${Output}\MainFile
sort case lh16
merge case lh16 using ${Output}\Education, nokeep
rename _merge _mergeSpEd
save ${Output}\MainFile, replace

